package IOBaseTest;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;

/**
 * Created by yexuan on 2018/3/12.
 */
public class BufferedReaderDemo {
    public static void main(String[] args) throws IOException {
        FileReader fr = new FileReader("buff.txt");

        BufferedReader bufr = new BufferedReader(fr);
        String line = null;
        //readLine方法表示一行一行的读，若已读完则返回空
        while ((line = bufr.readLine())!=null){
            System.out.println(line);
        }
        bufr.close();
    }
}
